﻿@model OrderModel
@{
    Layout = "_AdminPopupLayout";
    ViewBag.Title = T("Admin.Orders.Fields.PartialRefund").Text;
}

@using (Html.BeginForm())
{
    <div class="section-header">
        <div class="title">
			@string.Format(T("Admin.Orders.Fields.PartialRefund.OrderInfo").Text, Model.Id)
        </div>
        <div class="options">
        </div>
    </div>
    
    @Html.ValidationSummary(false)
	
    <table class="adminContent">
        <tr>
            <td class="adminTitle">
                @Html.SmartLabelFor(model => model.AmountToRefund)
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.AmountToRefund)
				<div class="alert alert-info mt-3">
                    @string.Format(@T("Admin.Orders.Fields.PartialRefund.AmountToRefund.Max").Text, Model.MaxAmountToRefundFormatted, "")
				</div>
            </td>
        </tr>
		<tr>
			<td class="adminTitle">
			</td>
			<td class="adminData">
				<button type="submit" name="partialrefundorder" value="@T("Admin.Orders.Fields.Refund")" id="partialrefundorder" class="btn btn-warning">
					<i class="fa fa-check"></i>
					<span>@T("Admin.Orders.Fields.Refund")</span>
				</button>
			</td>
		</tr>
    </table>
}